package com.zhaojy.poc.controller;

import com.zhaojy.poc.service.GpioExampleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by zhaojiuyang1 on 16/3/12.
 */
//@Controller
public class TestController {
    @Autowired
    private GpioExampleService gpioExampleService;

    @RequestMapping(value = "up", method = RequestMethod.GET)
    @ResponseBody
    public Object up(){
        gpioExampleService.up();
        return "success";
    }
    @RequestMapping(value = "down", method = RequestMethod.GET)
    @ResponseBody
    public Object down(){
        gpioExampleService.down();
        return "success";
    }
}
